package com.apkcore.flowlib.example

import android.util.Log
import com.apkcore.flowlib.flow.*

/**
 * @author chanehao
 * @date 2023/03/08
 * @apiNote
 */
class TwoState : Interceptor<String> {
    companion object {
        private const val TAG = "TwoState"
    }

    override suspend fun intercept(chain: Chain, request: Request): Request {
        request.values["aaaa"] = "put"
        val modifiedRequest = request
        Log.d(TAG, "Interceptor 2 executed, request: $modifiedRequest")
        return chain.proceed(modifiedRequest)
    }

    override fun feedback(): String {
        return "1233"
    }
}